<script setup lang="ts">
import { inject, type Ref, ref } from 'vue'
const money = inject<Ref<number>>('totalMoney', ref(0))
const updateTotalMoney = inject('updateTotalMoney', (num: number) => { })
</script>
<template>
  <span>
    <div>{{ money }}</div>
    <button @click="money--">点击支付小钱钱</button>
    <button @click="updateTotalMoney(100)">点击到账小钱钱-100</button>
  </span>
</template>